import classNames from 'classnames'
import PropTypes from 'prop-types'
function Icon({ className, type, ...rest }) {
  return (
    <svg {...rest} className={classNames('icon', className)} aria-hidden="true">
      <use xlinkHref={`#${type}`}></use>
    </svg>
  )
}

Icon.propTypes = {
  type: PropTypes.string.isRequired,
}
// 图标组件
export default Icon
